<?php
namespace Home\Controller;

use Home\Util\lib\YZTokenClient;
use Util\AccessController;
/*
 * 有赞接口
 */
class UserController extends AccessController {

    public function index(){
       $this->display();
    }
    public function login(){
        $LS = Service('User','user');
        $where['USERNAME'] = $_POST['USERNAME'];
        $where['PWD'] = md5($_POST['PWD']);
        $OK = $LS->find($where);
        if($OK){
            $this->S('AccessInterceptOK',1);
            redirect(U('ERPAPI/index'));
        }else{
            $this->error('账号密码错误');
        }
    }
}